package com.iwdnb.gkgz.application.utils;

import java.net.URL;

import javax.swing.*;

public class SaveStockImageUtils {

    private static final String STOCK_EMOTION_URL = "http://root.com:8001/api/stock/chart/stockEmotionSaveImage?date=";

    // 执行方法
    public static void stockEmotionSaveImage(String date) {
        try {
            String url = STOCK_EMOTION_URL + date;
            JEditorPane ed = new JEditorPane(new URL(url));
            ed.setSize(800, 600);
            Thread.sleep(10000L);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        stockEmotionSaveImage("2024-12-27");
    }
}
